﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// TP_EventList数据模型对象
    /// </summary>
    [Serializable]
    public partial class TP_EventListMod
    {
        /// <summary>
        /// 初始化TP_EventList数据模型对象
        /// </summary>
        public TP_EventListMod()
        {
            
        }
        /// <summary>
        /// 初始化TP_EventList数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="changeTime">ChangeTime</param>
        /// <param name="eventKey">EventKey</param>
        /// <param name="eventType">EventType</param>
        /// <param name="corpid">corpid</param>
        /// <param name="issend">issend</param>
        public TP_EventListMod(long iD,DateTime changeTime,string eventKey,string eventType,string corpid,bool issend)
        {
            //给ID字段赋值
            this.ID = iD;
            //给ChangeTime字段赋值
            this.ChangeTime = changeTime;
            //给EventKey字段赋值
            this.EventKey = eventKey;
            //给EventType字段赋值
            this.EventType = eventType;
            //给corpid字段赋值
            this.Corpid = corpid;
            //给issend字段赋值
            this.Issend = issend;
        }
        /// <summary>
        /// 初始化TP_EventList数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="changeTime">ChangeTime</param>
        /// <param name="eventKey">EventKey</param>
        /// <param name="carNo">carNo</param>
        /// <param name="evtPara">EvtPara</param>
        /// <param name="remark">Remark</param>
        /// <param name="userid">Userid</param>
        /// <param name="eventType">EventType</param>
        /// <param name="corpid">corpid</param>
        /// <param name="username">Username</param>
        /// <param name="longi">Longi</param>
        /// <param name="lati">Lati</param>
        /// <param name="issend">issend</param>
        public TP_EventListMod(long iD,DateTime changeTime,string eventKey,string carNo,string evtPara,string remark,string userid,string eventType,string corpid,string username,decimal? longi,decimal? lati,bool issend)
        {
            //给ID字段赋值
            this.ID = iD;
            //给ChangeTime字段赋值
            this.ChangeTime = changeTime;
            //给EventKey字段赋值
            this.EventKey = eventKey;
            //给carNo字段赋值
            this.CarNo = carNo;
            //给EvtPara字段赋值
            this.EvtPara = evtPara;
            //给Remark字段赋值
            this.Remark = remark;
            //给Userid字段赋值
            this.Userid = userid;
            //给EventType字段赋值
            this.EventType = eventType;
            //给corpid字段赋值
            this.Corpid = corpid;
            //给Username字段赋值
            this.Username = username;
            //给Longi字段赋值
            this.Longi = longi;
            //给Lati字段赋值
            this.Lati = lati;
            //给issend字段赋值
            this.Issend = issend;
        }
        
		//属性存储数据的变量
        private long _iD;
        private DateTime _changeTime;
        private string _eventKey;
        private string _carNo;
        private string _evtPara;
        private string _remark;
        private string _userid;
        private string _eventType;
        private string _corpid;
        private string _username;
        private decimal? _longi;
        private decimal? _lati;
        private bool _issend;
        
        /// <summary>
        /// ID
        /// </summary>
        public long ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// ChangeTime
        /// </summary>
        public DateTime ChangeTime
        {
            get { return this._changeTime; }
            set { this._changeTime = value; }
        }
        /// <summary>
        /// EventKey
        /// </summary>
        public string EventKey
        {
            get { return this._eventKey; }
            set { this._eventKey = value; }
        }
        /// <summary>
        /// carNo
        /// </summary>
        public string CarNo
        {
            get { return this._carNo; }
            set { this._carNo = value; }
        }
        /// <summary>
        /// EvtPara
        /// </summary>
        public string EvtPara
        {
            get { return this._evtPara; }
            set { this._evtPara = value; }
        }
        /// <summary>
        /// Remark
        /// </summary>
        public string Remark
        {
            get { return this._remark; }
            set { this._remark = value; }
        }
        /// <summary>
        /// Userid
        /// </summary>
        public string Userid
        {
            get { return this._userid; }
            set { this._userid = value; }
        }
        /// <summary>
        /// EventType
        /// </summary>
        public string EventType
        {
            get { return this._eventType; }
            set { this._eventType = value; }
        }
        /// <summary>
        /// corpid
        /// </summary>
        public string Corpid
        {
            get { return this._corpid; }
            set { this._corpid = value; }
        }
        /// <summary>
        /// Username
        /// </summary>
        public string Username
        {
            get { return this._username; }
            set { this._username = value; }
        }
        /// <summary>
        /// Longi
        /// </summary>
        public decimal? Longi
        {
            get { return this._longi; }
            set { this._longi = value; }
        }
        /// <summary>
        /// Lati
        /// </summary>
        public decimal? Lati
        {
            get { return this._lati; }
            set { this._lati = value; }
        }
        /// <summary>
        /// issend
        /// </summary>
        public bool Issend
        {
            get { return this._issend; }
            set { this._issend = value; }
        }
        
        /// <summary>
        /// 对比两个TP_EventList数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的TP_EventList数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成TP_EventList数据模型对象
            TP_EventListMod tP_EventListMod = obj as TP_EventListMod;
            //判断是否转换成功
            if (tP_EventListMod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == tP_EventListMod.ID &&
                //判断ChangeTime是否一致
                this.ChangeTime == tP_EventListMod.ChangeTime &&
                //判断EventKey是否一致
                this.EventKey == tP_EventListMod.EventKey &&
                //判断carNo是否一致
                this.CarNo == tP_EventListMod.CarNo &&
                //判断EvtPara是否一致
                this.EvtPara == tP_EventListMod.EvtPara &&
                //判断Remark是否一致
                this.Remark == tP_EventListMod.Remark &&
                //判断Userid是否一致
                this.Userid == tP_EventListMod.Userid &&
                //判断EventType是否一致
                this.EventType == tP_EventListMod.EventType &&
                //判断corpid是否一致
                this.Corpid == tP_EventListMod.Corpid &&
                //判断Username是否一致
                this.Username == tP_EventListMod.Username &&
                //判断Longi是否一致
                this.Longi == tP_EventListMod.Longi &&
                //判断Lati是否一致
                this.Lati == tP_EventListMod.Lati &&
                //判断issend是否一致
                this.Issend == tP_EventListMod.Issend;
        }
        /// <summary>
        /// 将当前TP_EventList数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将TP_EventList数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将ChangeTime进行按位异或运算处理
                this.ChangeTime.GetHashCode() ^
                //将EventKey进行按位异或运算处理
                (this.EventKey == null ? 2147483647 : this.EventKey.GetHashCode()) ^
                //将carNo进行按位异或运算处理
                (this.CarNo == null ? 2147483647 : this.CarNo.GetHashCode()) ^
                //将EvtPara进行按位异或运算处理
                (this.EvtPara == null ? 2147483647 : this.EvtPara.GetHashCode()) ^
                //将Remark进行按位异或运算处理
                (this.Remark == null ? 2147483647 : this.Remark.GetHashCode()) ^
                //将Userid进行按位异或运算处理
                (this.Userid == null ? 2147483647 : this.Userid.GetHashCode()) ^
                //将EventType进行按位异或运算处理
                (this.EventType == null ? 2147483647 : this.EventType.GetHashCode()) ^
                //将corpid进行按位异或运算处理
                (this.Corpid == null ? 2147483647 : this.Corpid.GetHashCode()) ^
                //将Username进行按位异或运算处理
                (this.Username == null ? 2147483647 : this.Username.GetHashCode()) ^
                //将Longi进行按位异或运算处理
                (this.Longi == null ? 2147483647 : this.Longi.GetHashCode()) ^
                //将Lati进行按位异或运算处理
                (this.Lati == null ? 2147483647 : this.Lati.GetHashCode()) ^
                //将issend进行按位异或运算处理
                this.Issend.GetHashCode();
        }
        /// <summary>
        /// 将当前TP_EventList数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前TP_EventList数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将ChangeTime转换成字符串
                this.ChangeTime + "," +
                //将EventKey转换成字符串
                this.EventKey + "," +
                //将EventType转换成字符串
                this.EventType + "," +
                //将corpid转换成字符串
                this.Corpid + "," +
                //将issend转换成字符串
                this.Issend +
                "]";
        }
    }
}
